import {
    payrollDetail
} from '../../api/app'
import user from '../../utils/user'
Page({
    data: {
        data: {}
    },
    onLoad: function (options) {
        user.waitLogin().then(() => {
            this.getData(options.id)
        })
    },
    onCallPhone() {
        wx.makePhoneCall({
            phoneNumber: this.data.data.params.contactsPhone,
        })
    },
    async getData(id) {
        const result = await payrollDetail({
            id: id,
        })
        this.setData({
            data: result
        })
    }
})